import javafx.scene.effect.GaussianBlur;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.Size;
import org.opencv.highgui.HighGui;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.imgproc.Imgproc;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-04-07
 * Time: 15:32
 */
public class Sharpen {
    static {
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
    }
    public static void main(String[] args) {
        Mat src = Imgcodecs.imread("obj.jpg");
        HighGui.imshow("src", src);
        HighGui.waitKey();
        Mat dst = new Mat();
        Mat usm = new Mat();
        Imgproc.GaussianBlur(src, dst, new Size(0, 0), 10, 10);
        Core.addWeighted(src, 1.5, dst, -0.5, 0, usm);
        HighGui.imshow("usm", usm);
        HighGui.waitKey();
    }
}
